<!doctype html>
<html ng-app="server_config">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link rel="icon" href="./img/config.png">
    <!-- styles -->
    <link rel="stylesheet" type="text/css" href="vendor/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="vendor/angular/angular-toastr-1.4.1.min.css">
    <link rel="stylesheet" type="text/css" media='all' href="vendor/angular/loading-bar.min.css">
    <link rel="stylesheet" type="text/css" href="styles/common-style.css">
    <title>应用配置</title>
</head>

<body>

<apollonav></apollonav>
<div class="container-fluid apollo-container">

    <div class="row">
        <div class="col-md-8 col-md-offset-2">
            <div class="panel">
                <header class="panel-heading">
                    应用配置
                    <small>（维护ApolloPortalDB.ServerConfig表数据，如果已存在配置项则会覆盖，否则会创建配置项。配置更新后，一分钟后自动生效）</small>
                </header>

                <div class="panel-body">
                    <form class="form-horizontal" ng-controller="ServerConfigController">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">
                                <apollorequiredfield></apollorequiredfield>
                                key</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" name="key" ng-model="serverConfig.key"
                                       required>
                                <small>(修改配置前请先查询该配置信息)</small>
                            </div>
                            <div class="col-sm-1">
                                <button class="btn btn-info" ng-click="getServerConfigInfo()">查询</button>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">
                                <apollorequiredfield></apollorequiredfield>
                                value</label>
                            <div class="col-sm-9">
                                <textarea class="form-control" rows="4" name="value" ng-model="serverConfig.value"></textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">
                                comment</label>
                            <div class="col-sm-9">
                                <textarea class="form-control" rows="4" name="comment" ng-model="serverConfig.comment"></textarea>
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <button type="submit" class="btn btn-primary"
                                        ng-disabled="saveBtnDisabled"
                                        ng-click="create()">
                                    保存
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

<div ng-include="'views/common/footer.html'"></div>

<!--angular-->
<script src="vendor/angular/angular.min.js"></script>
<script src="vendor/angular/angular-resource.min.js"></script>
<script src="vendor/angular/angular-toastr-1.4.1.tpls.min.js"></script>
<script src="vendor/angular/loading-bar.min.js"></script>

<!-- jquery.js -->
<script src="vendor/jquery.min.js" type="text/javascript"></script>

<!-- bootstrap.js -->
<script src="vendor/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>

<script type="application/javascript" src="scripts/app.js"></script>
<script type="application/javascript" src="scripts/directive/directive.js"></script>
<script type="application/javascript" src="scripts/AppUtils.js"></script>

<script type="application/javascript" src="scripts/services/AppService.js"></script>
<script type="application/javascript" src="scripts/services/EnvService.js"></script>
<script type="application/javascript" src="scripts/services/UserService.js"></script>
<script type="application/javascript" src="scripts/services/CommonService.js"></script>
<script type="application/javascript" src="scripts/services/ServerConfigService.js"></script>
<script type="application/javascript" src="scripts/services/PermissionService.js"></script>

<script type="application/javascript" src="scripts/controller/ServerConfigController.js"></script>
</body>
</html>
